#include "stm32f10x.h"
#include "systick.h"


void SYSTICK_Config(void)
{
	if(SysTick_Config(SYSTICK1US)==1)
	{
		while(1);
	}
	SYSTICK_DISENABLE();
}
u32 systick_time=0;
void Delay_us(u32 time)
{
	systick_time = time;
	SYSTICK_ENABLE();
	while(systick_time);
	SYSTICK_DISENABLE();
}
void SysTick_Handler(void)
{
	if(systick_time>0)
	{
		systick_time--;
	}
}
